package com.ayf.payment.game.api.mapper;

import com.ayf.payment.game.api.entity.MerchantProxyRel;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface MerchantProxyRelMapper extends Mapper<MerchantProxyRel> {
    /**
     * 查询出代理商所有下级商户号
     *
     * @param merchantId
     * @return
     */
    List<Integer> selectLowerIds(@Param("merchantId") Integer merchantId);

    /**
     * 删除代理商所有下级商户号
     *
     * @param merchantId
     * @return
     */
    int deleteByMerchantId(@Param("merchantId") Integer merchantId);

    /**
     * 删除代理商与下级商户的关系
     *
     * @param lowerId
     * @return
     */
    int deleteByLowerId(@Param("lowerId") Integer lowerId);
}